package com.gupaoedu.vip.factorymethod;

import com.gupaoedu.vip.model.Phone;

public class FactoryMethodTest {

    public static void main(String[] args) {
        Phone phone = new XiaomiPhoneFactoryMethod().getPhone();
        System.out.println(phone.getName());

        Phone phone1 = new HaiweiPhoneFactoryMethod().getPhone();
        System.out.println(phone1.getName());

        Phone phone2 = new IPhoneFactoryMethod().getPhone();
        System.out.println(phone2.getName());
    }
}
